import axios from 'axios'
// 查询所有
export async function getAllorders() {
    let resp = await axios.get('/api/order/', )
    console.log(resp);
    return resp.data.rows;
}
// 新增
export async function addorders(num, notes, url, status, createTime) {
    console.log(num, notes, url, status, createTime)
    let resp = await axios.post('/api/order/', {
        num, notes, url, status, createTime
    })
    console.log(resp);
    return resp.data.rows;
}
// 删除
export async function deleteorders(id) {
    console.log(id);
    let resp = await axios.delete('/api/order/' + id, {
        id
    })
    console.log(resp);
    return resp;
}
// 更新
export async function putorders(id, num, notes, url, status, createTime) {
    console.log(id, num, notes, url, status, createTime);
    let resp = await axios.put('/api/order/' + id, {
        num, notes, url, status, createTime
    })
    console.log(resp);
    return resp;
}
